#include <bits/stdc++.h>
using namespace std;
const int N = 1.5e5 + 10;
int a[N];
int main() {
  int tc;
  cin >> tc;
  while (tc--) {
    int n, q;
    cin >> n >> q;
    for (int i = 0; i < n; ++i) cin >> a[i];
    sort(a, a + n, greater<>());
    for (int i = 1; i < n; ++i) a[i] += a[i - 1];
    while (q--) {
      int x;
      cin >> x;
      int idx = lower_bound(a, a + n, x) - a;
      cout << (idx == n ? -1 : idx + 1) << endl;
    }
  }
}
